package com.zmkm.controller;

import com.zmkm.entity.Housekeeper;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
@RequestMapping({ "/pagejump/" })
public class Pagejump {
	@RequestMapping({ "toRegister" })
	public String toRegister() {
		return "register";
	}

	@RequestMapping({ "toIndex" })
	public String toIndex() {
		return "index";
	}

	@RequestMapping({ "toLogin" })
	public String toLogin(HttpServletRequest request) {
		Housekeeper housekeeper = (Housekeeper) request.getSession().getAttribute("housekeeper");
		if (housekeeper != null) {
			request.getSession().removeAttribute("housekeeper");
		}
		return "login";
	}

	@RequestMapping({ "toElseCountAdd" })
	public String toElseCountAdd() {
		return "financial_manage/elseCountAdd";
	}
}
